package com.orwa;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class JDBCConnector {
	
	public Connection getHRConn(){
		
		String url = "jdbc:oracle:thin:@localhost:1521:xe";
		String username = "hr";
		String password = "hr";
		try {
			Connection conn = DriverManager.getConnection(url, username, password);
			//Statement stm = conn.createStatement();
			Statement stm = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE);
			System.out.println("Connection successful!!!");
			return conn;
		}catch(SQLException e){
			e.printStackTrace();
			return null;
		}
		
	}

}
